{% load filters %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base target="mainFrame" />
<title>文章列表</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 14px;
	line-height:180%;
}
.pager a{
    margin: 0 3px 0 3px;
}
-->
</style>
<script type="text/javascript" src="{{ MEDIA_URL }}/js/jquery.js"></script>
<script type="text/javascript">
<!--
    function del_post(post_key){
        if(confirm("确认删除吗？")){
            $.post('/admin/del_post/', {'post_key':post_key}, function(){
                location.reload()
            });
        }
    }
//-->
</script>
</head>
<body>
	
    <table border="1" width="100%">
        
    
{% for post in post_list %}
<tr>
    <td>{{ post.offset }}</td>
    <td><a href="/p/{{ post.key }}/" target="_blank">{{ post.title }}</a></td>
    <td>{{ post.add_time|format_time }}</td>
    
    <td><a href="/admin/edit_post/?post_key={{ post.key }}">修改</a></td>
    <td><a href="javascript: del_post('{{ post.key }}')">删除</a></td>
</tr>

{% endfor %}

<tr>
<td colspan="5" class="pager">{{ pager.render|safe }}</td>
</tr>

</table>
</body>

</html>